<%@ page import="com.wanshi.entity.User" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/10/22
  Time: 14:11
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<html>
<head>
    <title>Title</title>
</head>
<body>




<h3> 修改  </h3>

<form action="${pageContext.request.contextPath}/ss/update" method="post">
    <input type="hidden" name="id" value="${requestScope.user.id}">

    <table border="1" cellspacing="0" cellpadding="10" align="center">

        <tr>
            <td>用户名</td>
            <td> <input type="text" name="username" value="${user.username}"/></td>
        </tr>

        <tr>
            <td>性别</td>
            <td><input type="radio" name="gender" value="nan"
                       ${user.gender == 'nan'?'checked':''}
            />男
                <input type="radio" name="gender" value="nv"
                ${user.gender == 'nv'?'checked':''}
                />女</td>
        </tr>

        <tr>
            <td>爱好</td>
            <td>
                <input type="checkbox" name="hobby" value="basketball"
                     ${fn:contains(user.hobby,'basketball')?'checked':''}
                />篮球
                <input type="checkbox" name="hobby" value="music"
                ${fn:contains(user.hobby,'music')?'checked':''}
                />音乐
                <input type="checkbox" name="hobby" value="dance"
                ${fn:contains(user.hobby,'dance')?'checked':''}
                />跳舞
                <input type="checkbox" name="hobby" value="football"
                ${fn:contains(user.hobby,'football')?'checked':''}
                />足球</td>
        </tr>

        <tr>
            <td>城市
            </td>

            <td>
                <select name="city">
                    <option value="shijiazhuang"
                    ${user.city == 'shijiazhuang'?'selected':''}
                    >石家庄</option>
                    <option value="beijing"
                    ${user.city == 'beijing'?'selected':''}
                    >北京</option>
                    <option value="shanghai"
                    ${user.city == 'shanghai'?'selected':''}
                    >上海</option>
                    <option value="newYork"
                    ${user.city == 'newYork'?'selected':''}
                    >纽约</option>
                </select>
            </td>
        </tr>

        <tr>
            <td>自我介绍</td>

            <td>
                <textarea rows="10" cols="40" name="introduce">${user.introduce}</textarea>
            </td>
        </tr>



        <tr>
            <td colspan="2" align="center"><input type="submit" value="修改"/></td>
        </tr>
    </table>


</form>


</body>
</html>
